﻿@model Topic
@{
	ViewBag.Title = T("Move thread \"{0}\" to another forum", Model.Title);
}
<ul class="path">
	<li class="first">@Html.ActionLinkLocalized("Forums", "List", "Forums")</li>
	<li>@Html.ActionLink(Model.Forum.Name, "Detail", "Forums", new{forum=Model.Forum.ShortName}, null)</li>
</ul>
<h1>@ViewBag.Title</h1>
@using (Html.BeginForm())
{
	@Html.AntiForgeryToken()
	<fieldset>
		<legend>@T("Select the destination forum")</legend>
		<div class="formItem floatContainer">
			<label for="forum_id">@T("Forum")</label>
			<select name="forum.id" id="forum_id">
			@foreach (ForumCategory category in ViewData.Get<List<ForumCategory>>("Categories"))
			{
				<optgroup label="@category.Name">
					@foreach (Forum forum in category.Forums)
					{
						if (Model.Forum.Id != forum.Id)
						{
							<option value="@forum.Id">@forum.Name</option>
						}
						else
						{
							<option value="@forum.Id" selected="selected">@forum.Name</option>
						}
					}
				</optgroup>
			}
			</select>
		</div>
		<div class="formItem buttons">
			<input type="submit" value="@T("Send")" />
		</div>
	</fieldset>
}
